import Vue from "vue";
import VueRouter from "vue-router";
import pageHome from "@/views/pageHome/pageHome.vue";

Vue.use(VueRouter);

const constantRoutes = [
    {
        path: "/",
        name: "pageHome",
        component: pageHome,
    },
    {
        path: "/pageHub",
        name: "pageHub",
        component: () => import(/* webpackChunkName: "pageHub" */ "@/views/pageHub/pageHub.vue"),
    },





];

/*const router = new VueRouter({
  mode: "history",  //hash,history
  base: process.env.BASE_URL,
  routes,
});*/

export default new VueRouter({
    mode: "hash",
    scrollBehavior: () => ({ y: 0 }),
    base: process.env.BASE_URL,
    routes: constantRoutes,
});

export const asyncRoutes = [{ path: "*", redirect: "/404", hidden: true }];
